package com.woniuxy.dao;

import com.woniuxy.model.PawnShop;
import com.woniuxy.model.PawnWarehouse;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author hujianying
 * @since 2022-03-23
 */
public interface PawnWarehouseDao extends BaseMapper<PawnWarehouse> {

    @Select("SELECT s1.shop_name FROM\n" +
            "           `t_pawn_shop` s1\n" +
            "           JOIN `t_pawn_shop_wh_rel` s2\n" +
            "            ON s1.shop_code=s2.shop_code\n" +
            "            JOIN `t_pawn_warehouse` s3\n" +
            "            ON s2.wh_code=s3.wh_code WHERE s3.wh_code=#{id}")
    List<String> findWhandShopname(String id);

}
